<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PxQueryFilterCallback Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="PhysXLogoBlack.png"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classPxQueryFilterCallback.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classPxQueryFilterCallback-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">PxQueryFilterCallback Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__scenequery.html">Scenequery</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Scene query filtering callbacks.  
 <a href="classPxQueryFilterCallback.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="PxQueryFiltering_8h_source.html">PxQueryFiltering.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a227beae6749182b04ae18728c1aecd26"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="structPxQueryHitType.html#acab1ef408184995d169330ed689b79e3">PxQueryHitType::Enum</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxQueryFilterCallback.html#a227beae6749182b04ae18728c1aecd26">preFilter</a> (const <a class="el" href="structPxFilterData.html">PxFilterData</a> &amp;filterData, const <a class="el" href="classPxShape.html">PxShape</a> *shape, const <a class="el" href="classPxRigidActor.html">PxRigidActor</a> *actor, PxHitFlags &amp;queryFlags)=0</td></tr>
<tr class="memdesc:a227beae6749182b04ae18728c1aecd26"><td class="mdescLeft">&#160;</td><td class="mdescRight">This filter callback is executed before the exact intersection test if <a class="el" href="structPxQueryFlag.html#a2124ff0cff0a021e01e6880a1bba431fa8afbf3ede02abfeef2a9e8d38f0b9a78" title="Run the pre-intersection-test filter (see PxQueryFilterCallback::preFilter()) ">PxQueryFlag::ePREFILTER</a> flag was set.  <a href="#a227beae6749182b04ae18728c1aecd26">More...</a><br /></td></tr>
<tr class="separator:a227beae6749182b04ae18728c1aecd26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa93cf87c4ec4548afc8cc5476c719781"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="structPxQueryHitType.html#acab1ef408184995d169330ed689b79e3">PxQueryHitType::Enum</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxQueryFilterCallback.html#aa93cf87c4ec4548afc8cc5476c719781">postFilter</a> (const <a class="el" href="structPxFilterData.html">PxFilterData</a> &amp;filterData, const <a class="el" href="structPxQueryHit.html">PxQueryHit</a> &amp;hit)=0</td></tr>
<tr class="memdesc:aa93cf87c4ec4548afc8cc5476c719781"><td class="mdescLeft">&#160;</td><td class="mdescRight">This filter callback is executed if the exact intersection test returned true and <a class="el" href="structPxQueryFlag.html#a2124ff0cff0a021e01e6880a1bba431fa98ce80be9551f124bd882bdb83dafb7e" title="Run the post-intersection-test filter (see PxQueryFilterCallback::postFilter()) ">PxQueryFlag::ePOSTFILTER</a> flag was set.  <a href="#aa93cf87c4ec4548afc8cc5476c719781">More...</a><br /></td></tr>
<tr class="separator:aa93cf87c4ec4548afc8cc5476c719781"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13867beb1e0845761661bc9311706f56"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxQueryFilterCallback.html#a13867beb1e0845761661bc9311706f56">~PxQueryFilterCallback</a> ()</td></tr>
<tr class="memdesc:a13867beb1e0845761661bc9311706f56"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual destructor  <a href="#a13867beb1e0845761661bc9311706f56">More...</a><br /></td></tr>
<tr class="separator:a13867beb1e0845761661bc9311706f56"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Scene query filtering callbacks. </p>
<p>Custom filtering logic for scene query intersection candidates. If an intersection candidate object passes the data based filter (see <a class="el" href="structPxQueryFilterData.html" title="Scene query filtering data. ">PxQueryFilterData</a>), filtering callbacks are executed if requested (see <a class="el" href="structPxQueryFilterData.html#a02180ad928beb2e5d3d5caf4cc84f387" title="Filter flags (see PxQueryFlags) ">PxQueryFilterData.flags</a>)</p>
<ul>
<li>If <a class="el" href="structPxQueryFlag.html#a2124ff0cff0a021e01e6880a1bba431fa8afbf3ede02abfeef2a9e8d38f0b9a78" title="Run the pre-intersection-test filter (see PxQueryFilterCallback::preFilter()) ">PxQueryFlag::ePREFILTER</a> is set, the preFilter function runs before exact intersection tests. If this function returns <a class="el" href="structPxQueryHitType.html#acab1ef408184995d169330ed689b79e3aac7ebce08c20ff88ea4328035daa2498" title="a hit on the shape touches the intersection geometry of the query but does not block it ...">PxQueryHitType::eTOUCH</a> or <a class="el" href="structPxQueryHitType.html#acab1ef408184995d169330ed689b79e3a60dc59a348d85c101747ed45d9b20750" title="a hit on the shape blocks the query (does not block overlap queries) ">PxQueryHitType::eBLOCK</a>, exact testing is performed to determine the intersection location.</li>
</ul>
<p>The preFilter function may overwrite the copy of queryFlags it receives as an argument to specify any of <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64a96f3049caa29758b18308a37e97370f1" title="Only this subset of flags can be modified by pre-filter. Other modifications will be discarded...">PxHitFlag::eMODIFIABLE_FLAGS</a> on a per-shape basis. Changes apply only to the shape being filtered, and changes to other flags are ignored.</p>
<ul>
<li>If <a class="el" href="structPxQueryFlag.html#a2124ff0cff0a021e01e6880a1bba431fa8afbf3ede02abfeef2a9e8d38f0b9a78" title="Run the pre-intersection-test filter (see PxQueryFilterCallback::preFilter()) ">PxQueryFlag::ePREFILTER</a> is not set, precise intersection testing is performed using the original query's filterData.flags.</li>
</ul>
<ul>
<li>If <a class="el" href="structPxQueryFlag.html#a2124ff0cff0a021e01e6880a1bba431fa98ce80be9551f124bd882bdb83dafb7e" title="Run the post-intersection-test filter (see PxQueryFilterCallback::postFilter()) ">PxQueryFlag::ePOSTFILTER</a> is set, the postFilter function is called for each intersection to determine the touch/block status. This overrides any touch/block status previously returned from the preFilter function for this shape.</li>
</ul>
<p>Filtering calls are not guaranteed to be sorted along the ray or sweep direction.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPxScene.html#a7d7dcd877cee092f8b57c67d79982b50" title="Performs a raycast against objects in the scene, returns results in a PxRaycastBuffer object or via a...">PxScene.raycast</a> <a class="el" href="classPxScene.html#a9b07b2a98e64105a06e97ffaeba2a63d" title="Performs a sweep test against objects in the scene, returns results in a PxSweepBuffer object or via ...">PxScene.sweep</a> <a class="el" href="classPxScene.html#a31d09c0e967f9806a1f0d5df78dfc996" title="Performs an overlap test of a given geometry against objects in the scene, returns results in a PxOve...">PxScene.overlap</a> <a class="el" href="group__scenequery.html#gaacf083b040f6c841644782282171bd61" title="Flags typedef for the set of bits defined in PxQueryFlag. ">PxQueryFlags</a> PxHitFlags </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a13867beb1e0845761661bc9311706f56"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a13867beb1e0845761661bc9311706f56">&#9670;&nbsp;</a></span>~PxQueryFilterCallback()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual PxQueryFilterCallback::~PxQueryFilterCallback </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>virtual destructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aa93cf87c4ec4548afc8cc5476c719781"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa93cf87c4ec4548afc8cc5476c719781">&#9670;&nbsp;</a></span>postFilter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="structPxQueryHitType.html#acab1ef408184995d169330ed689b79e3">PxQueryHitType::Enum</a> PxQueryFilterCallback::postFilter </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structPxFilterData.html">PxFilterData</a> &amp;&#160;</td>
          <td class="paramname"><em>filterData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structPxQueryHit.html">PxQueryHit</a> &amp;&#160;</td>
          <td class="paramname"><em>hit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This filter callback is executed if the exact intersection test returned true and <a class="el" href="structPxQueryFlag.html#a2124ff0cff0a021e01e6880a1bba431fa98ce80be9551f124bd882bdb83dafb7e" title="Run the post-intersection-test filter (see PxQueryFilterCallback::postFilter()) ">PxQueryFlag::ePOSTFILTER</a> flag was set. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">filterData</td><td>custom filter data of the query </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">hit</td><td>Scene query hit information. faceIndex member is not valid for overlap queries. For sweep and raycast queries the hit information can be cast to <a class="el" href="structPxSweepHit.html" title="Stores results of sweep queries. ">PxSweepHit</a> and <a class="el" href="structPxRaycastHit.html" title="Stores results of raycast queries. ">PxRaycastHit</a> respectively. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the updated hit type for this hit (see <a class="el" href="structPxQueryHitType.html" title="Classification of scene query hits (intersections). ">PxQueryHitType</a>) </dd></dl>

</div>
</div>
<a id="a227beae6749182b04ae18728c1aecd26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a227beae6749182b04ae18728c1aecd26">&#9670;&nbsp;</a></span>preFilter()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="structPxQueryHitType.html#acab1ef408184995d169330ed689b79e3">PxQueryHitType::Enum</a> PxQueryFilterCallback::preFilter </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structPxFilterData.html">PxFilterData</a> &amp;&#160;</td>
          <td class="paramname"><em>filterData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxShape.html">PxShape</a> *&#160;</td>
          <td class="paramname"><em>shape</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPxRigidActor.html">PxRigidActor</a> *&#160;</td>
          <td class="paramname"><em>actor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PxHitFlags &amp;&#160;</td>
          <td class="paramname"><em>queryFlags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>This filter callback is executed before the exact intersection test if <a class="el" href="structPxQueryFlag.html#a2124ff0cff0a021e01e6880a1bba431fa8afbf3ede02abfeef2a9e8d38f0b9a78" title="Run the pre-intersection-test filter (see PxQueryFilterCallback::preFilter()) ">PxQueryFlag::ePREFILTER</a> flag was set. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">filterData</td><td>custom filter data specified as the query's filterData.data parameter. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>A shape that has not yet passed the exact intersection test. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">actor</td><td>The shape's actor. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">queryFlags</td><td>scene query flags from the query's function call (only flags from <a class="el" href="structPxHitFlag.html#a44c173f6ddf0522ffbd8fa3c585e6b64a96f3049caa29758b18308a37e97370f1" title="Only this subset of flags can be modified by pre-filter. Other modifications will be discarded...">PxHitFlag::eMODIFIABLE_FLAGS</a> bitmask can be modified) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the updated type for this hit (see <a class="el" href="structPxQueryHitType.html" title="Classification of scene query hits (intersections). ">PxQueryHitType</a>) </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxQueryFiltering_8h_source.html">PxQueryFiltering.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.14-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classPxQueryFilterCallback.html">PxQueryFilterCallback</a></li>
    <li class="footer">Copyright &copy; 2008-2021 NVIDIA Corporation, 2788 San Tomas Expressway, Santa Clara, CA 95051 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a></li>
  </ul>
</div>
</body>
</html>
